// A-S-M team
// Project: BattleCity
// Created: 23.03.2011
// Last change: 23.03.2011
// Description: class "Timer" provides easy-to-use algorythm to get time of code
//    execution between two time measures. It is multi-platform.

#pragma once
#include <ClanLib/core.h>

class Timer
{
public:
	Timer()
	{
		time1 = 0;
		time2 = 0;
		diff_time = 0;
	}

	void getFirstTime() { time1 = CL_System::get_time(); }
	void getSecondTime() { time2 = CL_System::get_time(); }
	void saveDiffTime() { diff_time = time2 - time1; }
	int getDiffTime() { return diff_time; }	// in milliseconds
private:
	int time1, time2;
	int diff_time;
};

